package com.klun.concDesign.chapterFive.Curr_5_6;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * 计算乘法
 */
public class Mutiply implements Runnable {
    public static BlockingQueue<Msg> bq = new LinkedBlockingQueue<>();
    @Override
    public void run() {
        while (true){
            try{
                Msg msg = bq.take();
                msg.i = msg.i * msg.j;
                Div.bq.add(msg);
            }catch (InterruptedException e){

            }
        }
    }
}
